<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>template</title>
  <script src="../vue.js"></script>
</head>
<body>
  <div id="root">
    {{title}} abc
    <div v-html="header"></div>
    <div v-text="header">abc</div>
    <div :data-url="url + '/'">greeting</div>
    <input type="text" v-bind:disabled="true">
    <div>
      {{1+1}}
      {{true ? 'true' : 'false'}}
      {{add(4, 5)}}
      {{x = 0}}
      {{true && false}}
      {{/\d/.test(3)}}
      {{(function() {})()}}
    </div>
    <div @[action].enter="handleClick">click</div>
  </div>
  <script>
    Vue.config.productionTip = false
    var vm = new Vue({
      el: '#root',
      data: {
        title: 'hello',
        header: '<h1>this is a header</h1>',
        url: 'http://www.baidu.com',
        x: 100,
        action: 'click'
      },
      methods: {
        add(x, y) {
          console.log(x+y)
        },
        handleClick() {
          console.log(100)
        }
      },
    })


    // let y = 'bbb'
    // let x = {
    //   aaa: 100,
    //   [y]: 200
    // }
    // console.log(x.bbb)
  </script>
</body>
</html>